home *** CD-ROM | disk | FTP | other *** search
-
- PIPE Command for Amiga Shell
-
- (c) 1994 Martin Mares, MJSoft System Software
-
- ================================================================================
-
-
- Preface
- =======
-
- Pipe 0.9 and its documentation are Copyright (c) Martin Mares, MJSoft System
- Software, Prague, Czech Republic.
-
- This archive can be freely redistributed, as long as all of its files are
- included in their original form without any additions, deletions or
- modifications, and no more than a nominal fee is charged for its distribution.
- All copyright notices in the programs and accompanying documentation files must
- remain on their places. Also '.displayme' and other similar files may not be
- added. This is generally known as FREEWARE.
-
- This software is provided "AS IS" without warranty of any kind, either
- expressed or implied. The author is not responsible for any damage caused by
- it.
-
-
- Introduction
- ============
-
- Standard AmigaDos Shell doesn't directly support any kind of piping. The
- Queue-Handler supplied by CBM allows to create only named pipes. No kind of
- usual UNIX-like pipes is here!
-
- But... The Shell allows to specify two local environment variables called
- _pchar and _mchar. Each of these variables can contain one or two characters (if
- more than two chars are specified, the rest of the string is silently ignored).
- If any of these characters is found in the command line, surrounded by
- whitespaces, the command line is pre-parsed (all $xxx and `xxx' constructs are
- substituted etc.) and the result is passed as an argument to a command called
- 'PIPE', which would do everything needed to create the pipe if it were here...
- And it's here now!
-
- PIPE is pure and can be made resident.
-
-
- Requirements
- ============
-
- - Kickstart 2.04 or higher (well, it would be simple to write it compatible
- with 1.3, but the 1.3 Shell doesn't support those piping features).
-
- - 68000 or higher
-
-
- Usage
- =====
-
- Add the following two lines to your S:Shell-startup:
-
- set _pchar "|"
- set _mchar "||"
-
- and copy the Pipe command to any directory which is in your path.
-
- After these steps, your Shell will be able to process standard UNIX-like pipe
- commands. For example:
-
- gzip -d <test.tar.gz | tar tvf -
-
- lists a tar archive compressed with gzip. Or:
-
- list nohead | fsort | tee ram:x
-
- prints out a sorted listing of current directory, copying it also to ram:x.
- (The fsort and tee commands were also written by me and can be found on the
- AmiNet in archives: SSLExamples2.lha and MJUtils.lha.)
-
- The standard pipe has a 4K buffer. In some cases (for example if
- decompressing a large tar archive with gzip unpacking), larger size would be
- better. This can be accomplished by specifying '||' instead of '|', which asks
- Pipe to use a 'thick pipe' with 64K buffer.
-
-
- Known bugs
- ==========
-
- I'm very sorry, but this version of Pipe doesn't support scripts yet, because
- I don't know any way of asynchronous execution of scripts which would accept
- different stdin and stderr and which would return proper return codes to the
- caller. If you know how to do it, send me a mail.
-
-
- Notes
- =====
-
- Send comments, suggestions and bug reports to mjsoft@k332.feld.cvut.cz
-